package com.java.imauoj.mapper;

import com.java.imauoj.moudel.Role;
import com.java.imauoj.moudel.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface LoginMapper {

     @Select("select user_id,username,nickname,own_sign,via,name,sex,school_id,class_id,in_date,last_date,email,gitee_username,poi,submit_count,ac_count,exp,role_id" +
             " from user where username=#{username} and password=#{password}")
    User getUser(@Param("username") String username, @Param("password") String password);

     @Select("select * from role where role_id=#{role_id}")
    Role getRole(@Param("role_id") int role_id);
}
